import request from '@/utils/request'

export function getLocations(query) {
  return request({
    url: '/popularize/location/getList',
    method: 'post',
    data: query
  })
}

export function getLocation(id) {
  return request({
    url: '/popularize/location/getDetail',
    method: 'post',
    data: id
  })
}

export function saveLocation(id) {
  return request({
    url: '/popularize/location/save',
    method: 'post',
    data: id
  })
}

export function deleteLocationByID(id) {
  return request({
    url: '/popularize/location/delete',
    method: 'post',
    data: id
  })
}

export function removeLocationByID(id) {
  return request({
    url: '/popularize/location/remove',
    method: 'post',
    data: id
  })
}

export function changeLocationStatusByID(formdata) {
  return request({
    url: '/popularize/location/change-status',
    method: 'post',
    data: formdata
  })
}

export function getLocationAvabile() {
  return request({
    url: '/popularize/location/getAvailable',
    method: 'post'
  })
}

